package com.digitalxpert.jargle.persistence;
import java.io.Serializable;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name = "APPLICATION")
public class JGApplication implements Serializable {
	private Long id;
	private String appName;
	private Collection<JGPackage> pckgs;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@Column(name = "APP_NAME")
	public String getAppName() {
		return appName;
	}
	public void setAppName(String appName) {
		this.appName = appName;
	}
	@OneToMany(cascade = CascadeType.ALL, mappedBy = "app")
	public Collection<JGPackage> getPckgs() {
		return pckgs;
	}
	public void setPckgs(Collection<JGPackage> pckgs) {
		this.pckgs = pckgs;
	}
	
	
}
